package com.mianshi;

import java.util.Scanner;

public class weidian {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s1 = in.nextLine();
        String s2 = in.nextLine();
        int i = 0, j = 0;
        if(s1.length() == 0 && s2.length() == 0){
            System.out.println("yes");
        }
        if(s1.length() == 0 || s2.length() == 0){
            System.out.println("no");
        }
        while(i <= s1.length()-1 && j <= s2.length()-1){
            char target = s2.charAt(j);
            while(i <= s1.length()-1 && s1.charAt(i) != target){
                i++;
            }
            if(i > s1.length()-1){
                break;
            }
            i++;
            j++;
        }
        if(j > s2.length()-1){
            System.out.println("yes");
        } else {
            System.out.println("no");
        }
    }
}
